<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{% block title %}{% endblock %} - Docs.ren</title>
    <meta name="keywords" content="{{baseSettings.keywords}}" />
    <meta name="description" content="{{baseSettings.description}}">

    <link rel="stylesheet" href="/dest/css/app.min.css" type="text/css">
    {% block style %}
    {% endblock %}
    <script>
        var USER = '{{user.sex}}';
    </script>
</head>
<body>
<div class="app app-header-fixed app-aside-folded" id="app">

    <div id="global-flash">
        <i class="gclose fa fa-times"></i>
        <div class="f-outer">
            <div class="g-msg">
                <i></i>
                 <span></span>
            </div>
        </div>
    </div>

    <div class="app-header navbar">
        <div class="mask-header no-show"></div>
        <div class="navbar-header bg-dark">
            <button class="pull-right visible-xs dk">
                <i class="glyphicon glyphicon-cog"></i>
            </button>
            <button class="pull-right visible-xs">
                <i class="glyphicon glyphicon-align-justify"></i>
            </button>
            <!-- brand -->
            <a href="/" class="navbar-brand text-lt">
                <img src="/img/logo.png" />
                <span class="hidden-folded">Docs.ren</span>
            </a>
            <!-- / brand -->
        </div>
        <!-- / navbar header -->

        <!-- navbar collapse -->
        <div class="collapse pos-rlt navbar-collapse box-shadow bg-white-only">

            <!-- link and dropdown -->
            <ul class="nav navbar-nav hidden-sm">

                <li class="nav-dropdown-toggle">
                    <a href="javascript:;">
                        <i class="fa fa-fw fa-plus visible-xs-inline-block"></i>
                        <span>发布</span>
                        <span class="caret"></span>
                    </a>

                    <ul class="dropdown-menu">
                        <li><a href="/publish">文章</a></li>
                        <li>
                            <a href="/create">
                                <span class="">文档</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>




            <form action="/take/" class="navbar-form navbar-form-sm navbar-left shift">
                <div class="form-group">
                    <div class="input-group">
                          <input type="text" name="s" class="form-control input-sm bg-light no-border padder" placeholder="Search projects..." />
                          <span class="input-group-btn">
                                <button type="submit" class="btn btn-sm bg-light"><i class="fa fa-search"></i></button>
                          </span>
                    </div>
                </div>
            </form>
            <!-- / link and dropdown -->


            <div class="nav navbar-nav height50">
                <!--<a href="javascript:;" class="btn no-shadow navbar-github">-->
                    <!--<iframe  src="https://ghbtns.com/github-btn.html?user=petitspois&repo=qdblog&type=watch&&count=true" width="80" height="20" frameborder="0" scrolling="0" ></iframe>-->
                <!--</a>-->
                <!--<a href="javascript:;" class="btn no-shadow navbar-github">-->
                    <!--<iframe src="https://ghbtns.com/github-btn.html?user=petitspois&repo=qdblog&type=fork&&count=true" width="80" height="20" frameborder="0" scrolling="0" ></iframe>-->
                <!--</a>-->
            </div>


            <!-- nabar right -->
            <ul class="nav navbar-nav navbar-right">

                {% if user %}
                <li class="nav-dropdown-toggle">
                    <a href="/notifications">
                        <i class="not-icon fa fa-inbox"></i>
                        <span class="not-icon-msg forcehide fade-in-left ng-enter"></span>
                    </a>
                </li>



                <li class="nav-dropdown-toggle">

                    <a href="javascript:;" class="clear">
                          <span class="thumb-sm avatar pull-right m-t-n-sm m-b-n-sm m-l-sm">
                            <img src="{{user.avatar}}" alt="...">
                            <i class="{{user.sex}} md b-white bottom"></i>
                          </span>
                        <span class="hidden-sm hidden-md">{{user.nickname}}</span>
                        <b class="caret"></b>
                    </a>


                    <!-- dropdown -->
                    <ul id="user-child-right" class="dropdown-menu animated fadeInRight w">
                        <li class="wrapper b-b bg-light m-t-n-xs m-b-sm">
                            <div class="m-b-n-xs">
                                <p>积分:{{level.level}}</p>
                                {% if level.role < 1 %}
                                <p>身份:会员</p>
                                {% elseif 1 == level.role %}
                                <p>身份:开发者</p>
                                {% elseif 2 == level.role %}
                                <p>身份:管理员</p>
                                {% elseif level.role > 2 %}
                                <p>身份:PW</p>
                                {% endif%}
                            </div>
                        </li>
                        <li>
                            <a href="/settings">
                                <span>操作中心</span>
                            </a>
                        </li>
                        <li>
                            <a href="/profile">个人中心</a>
                        </li>
                        <li>
                            <a href="{{baseSettings.helplink}}">
                                <span class="label bg-info pull-right">new</span>
                                帮助
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a id="logout" href="javascript:;"> 注 销 </a>
                        </li>
                    </ul>
                    <!-- / dropdown -->
                </li>

                {% else %}

                    <li>
                        <div class="m-t-sm m-r">
                            <a href="/signin" class="btn btn-link btn-sm">登陆</a> or
                            <a href="/signup" class="btn btn-sm btn-success btn-rounded m-l"><strong>注册</strong></a>
                        </div>
                    </li>

                {% endif %}


            </ul>


            <!-- / navbar right -->

        </div>
    </div>









    <!-- menu -->
    <div class="app-aside hidden-xs bg-dark">
        <div class="aside-wrap ">
            <div class="navi-wrap">
                <!-- nav -->
                <nav class="navi clearfix">
                    <div class="mask-nav no-show"></div>

                    <ul class="nav ">
                        <li>
                            <a href="/docs" class="auto">
                                <i class="glyphicon glyphicon-book icon text-primary-dker"></i>
                                <span class="font-bold">文档</span>
                            </a>
                        </li>





                        <li class="line dk"></li>


                        <li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
                            <span translate="aside.nav.your_stuff.YOUR_STUFF" class="">Your Stuff</span>
                        </li>
                        <li>
                            <a href="/profile">
                                <i class="icon-user icon text-success-lter"></i>
                            </a>
                        </li>
                        <li>
                            <a href="{{baseSettings.helplink}}" title="帮助">
                                <i class="icon-question icon"></i>
                            </a>
                        </li>
                    </ul>
                </nav>

            </div>
        </div>
    </div>
    <!-- / menu -->



   <span id="gotop"></span>




    <div class="app-content">

        <div class="butterbar active"><span class="bar"></span></div>

        <div class="app-content-body">

            <div class="ng-enter">
            {% if secondtitle %}
                <div class="bg-light lter b-b wrapper-md">
                    <h2 class="m-n font-thin h3">{% block secondtitle %}default{% endblock %}</h2>
                </div>
            {% endif %}

                {% block content %}
                     <p>找不到相应的内容</p>
                {% endblock %}

            </div>

        </div>

    </div>










    <!-- footer -->
    <div class="app-footer wrapper b-t bg-light ">
        <span class="pull-right ng-binding">
            <a href="#gotop" target="_self" class="m-l-sm text-muted"><i class="fa fa-long-arrow-up"></i></a>
            {% autoescape false %}{{baseSettings.statistics}}{% endautoescape %}
            v0.0.1
        </span>
		<a href="https://github.com/petitspois/docs.ren" target="_blank">源码地址</a>
        © 2015 Copyright.
    </div>
    <div class="mask">
        <div id="alert" class="msg alertok no-show">
            <button class="close">
                <span>×</span>
                <span class="sr-only">Close</span>
            </button>
            <span></span>
        </div>
        <img id="load" class="no-show" src="/img/flickr.svg" alt="loading..."/>
    </div>
    <!-- / footer -->
</div>
{% block commonloadjs %}
    <script src="/dest/js/lib/require.min.js" type="text/javascript"></script>
    <script src="/dest/js/common.min.js" type="text/javascript"></script>
{% endblock %}
{% block loadjs %}
{% endblock %}
</body>
</html>
